<script type="text/javascript">
    $(document).ready(function() {
        // date picker
        $(".tanggal").datepicker({
            yearRange: '-1:+1',
            target: 'tanggal',
            changeMonth: true,
            changeYear: true,
            showOn: 'both',
            buttonImage: '{$BASEURL}/resource/doc/images/icon/calendar.gif',
            buttonImageOnly: true,
            dateFormat: 'yy-mm-dd'
        });
    });
</script>
<div class="breadcrum">
    <p>
        <a href="{$config->site_url('inventarisasi/add_barang')}">Inventarisasi</a>
        <span></span>
        <small>Pengadaan</small>
    </p>
    <div class="clear"></div>
</div>  
<div class="sub-content">  
    <div class="navigation">  
        <div class="navigation-button">
            <ul>
                <li><a href="{$config->site_url('inventarisasi/pengadaan')}"><img alt="" src="{$BASEURL}/resource/doc/images/icon/add-icon.png">Tambah Data</a></li>
                <li><a href="{$config->site_url('inventarisasi/pengadaan')}"><img alt="" src="{$BASEURL}/resource/doc/images/icon/icon.notes.blue.png">Daftar Data</a></li> 
            </ul>
            <div class="clear"></div>
        </div>
    </div> 
    <!-- notification template -->
    {include file="base/templates/notification.html"}
    <!-- end of notification template--> 
    <form action="{$config->site_url('inventarisasi/pengadaan/add_process')}" method="post">
        <table width="100%" class="table-input">
            <tbody>
                <tr class="headrow">
                    <th colspan="4">Tambah Pengadaan</th>
                </tr>
                <tr>
                    <td width="15%">Nomor Pengadaan</td>
                    <td width="35%">
                        <input type="text" maxlength="30" size="30" name="pengadaan_nomor" value="{$result.pengadaan_nomor|default:''}">
                        <small>* wajib diisi</small>
                    </td> 

                    <td>pengadaan_tgl_dist</td>
                    <td>
                        <input class="tanggal" name="pengadaan_tgl_dist" type="text" value="{$result.pengadaan_tgl_dist|default:''}" size="10" maxlength="10" readonly="readonly" />
                        <small>* wajib diisi</small>
                    </td> 
                </tr>
                <tr>
                    <td>Tanggal Pengadaan</td>
                    <td>
                        <input class="tanggal" name="pengadaan_date" type="text" value="{$result.pengadaan_date|default:''}" size="10" maxlength="10" readonly="readonly" />
                        <small>* wajib diisi</small>
                    </td> 

                    <td>pengadaan_keterangan</td>
                    <td>
                        <input type="text" maxlength="100" size="40" value="{$result.pengadaan_keterangan|default:''}" name="pengadaan_keterangan">
                        <small>* wajib diisi</small>
                    </td> 
                </tr> 
                <tr>
                    <td>Bagian</td>
                    <td>
                        <select name="bagian_cd" id="bagian_cd" style="width:150px;">
                            <option value=""></option>
                            {foreach from=$rs_bagian item=data}
                            <option value="{$data.bagian_cd|default:''}" {if {$result.bagian_cd|default:''} eq $data.bagian_cd}selected="selected"{/if}>{$data.bagian_name}</option>
                            {/foreach}
                        </select>
                        <small>* wajib diisi</small>
                    </td>    

                    <td>pengadaan_att_surat</td>
                    <td>
                        <input type="text" maxlength="100" size="40" value="{$result.pengadaan_att_surat|default:''}" name="pengadaan_att_surat">
                        <small>* wajib diisi</small>
                    </td> 
                </tr> 
                <tr>
                    <td>Lokasi</td>
                    <td>
                        <select name="lokasi_cd" id="lokasi_cd" style="width:150px;">
                            <option value=""></option>
                            {foreach from=$rs_lokasi item=data}
                            <option value="{$data.lokasi_cd|default:''}" {if {$result.lokasi_cd|default:''} eq $data.lokasi_cd}selected="selected"{/if}>{$data.lokasi_name}</option>
                            {/foreach}
                        </select>
                        <small>* wajib diisi</small>
                    </td>   
                    
                    <td>pengadaan_att_dist</td>
                    <td>
                        <input type="text" maxlength="100" size="40" value="{$result.pengadaan_att_dist|default:''}" name="pengadaan_att_dist">
                        <small>* wajib diisi</small>
                    </td> 
                </tr> 
                <tr>
                    <td>pengadaan_ba_dist</td>
                    <td>
                        <input type="text" maxlength="100" size="40" value="{$result.pengadaan_ba_dist|default:''}" name="pengadaan_ba_dist">
                        <small>* wajib diisi</small>
                    </td> 
                </tr>  
                <tr class="submit-box">
                    <td colspan="4">
                        <input type="submit" class="edit-button" value="Simpan" name="save[insert]">
                        <input type="reset" class="edit-button" value="Reset" name="save[reset]">
                    </td>
                </tr>
            </tbody>
        </table>
    </form> 
</div>